In a thermal printer for displaying a digital image, a thermal print head having a plurality of heaters is activated to transfer dye from a dye carrier medium to an image receiver such as paper. To achieve a continuous tone, the heaters in the thermal print head are modulated to transfer desired amounts of dye for each pixel in the image. The digital image is typically stored as a number of lines of multi-bit pixels, where the value of each pixel represents the gradation value of the pixel. The task of modulating the print head involves converting the lines of multi-bit pixel values into a number of lines of single bit serial data which are sent to a shift register in the print head as shown in FIG. 3.
A typical serial print head as illustrated in FIG. 3 has a number of heating resistors 50 arranged in a linear array. The head also has a solid state serial input shift register 52. The print head shown (as an example) has 512 resistors, and a single serial shift register that has 512 elements. Each shift register element acts as a digital switch, a 0 bit in the element will not close the switch, a 1 bit will. When the digital switch is closed, current flows from the DC head voltage supply to the DC head ground when a printing pulse is applied. A resistor that is energized will heat up, and cause thermal dye to be deposited on the print.
To energize the print head, a stream of 512 modulation bits must be clocked into the shift register 52. One bit must be put into each shift register element regardless whether that resistor will be turned on or not. Every time the print head is to be energized, a stream of 512 modulation bits must be clocked into the shift register.
Known modulation methods include “Modulation by Comparison” and “Decrement Until Zero”, which will be described below.
Modulation by Comparison
One known method of producing serial modulation bits involves repeatedly comparing a pixel to an incrementally changing threshold value. This method has for example been discussed in U.S. Pat. No. 5,321,427 issued Jun. 14, 1994 to Agar et al. The result of that comparison is used to produce an “on” or “off” modulation bit, normally represented by a one or a zero, respectively. In the example shown in Table I below, a 3-bit pixel with a gradation value of 5 is successively compared to the threshold values of 1 through 7, to produce 7 modulation bits (note that a 3-bit pixel can have any one of 23=8 values between 0 and 7). If the pixel value is greater than or equal to the threshold, then the modulation bit is a “1”, otherwise the modulation bit is a “0”. The multi-bit pixel value of 5 produces five “1” bits and two “0” bits in this example.
TABLE IModulation By ComparisonPixel Value5555555Threshold Value1234567Modulation Bit1111100Decrement Until Zero
Another method of producing a stream of serial modulation bits from multi-bit pixel values is to successively test each pixel value in a line to determine if it is non-zero. If a pixel's value is non-zero, its value is decremented by one and a “1” modulation bit is produced. The process is then repeated with the decremented pixel values. When a decremented pixel value reaches zero, it is no longer decremented, and the modulation bit produced is a “0”. As shown in Table II below, a pixel value of 5 is first determined to be non-zero, it is then decremented to 4, and a “1” modulation bit is produced. This is repeated 4 more times, until the pixel value has been decremented to 0. For the last 2 bits in the example, the pixel value is already 0, so “0” modulation bits are produced, and the pixel value is no longer decremented. The multi-bit pixel value of 5 produces five “1” bits, and two “0” bits.
TABLE IIModulation by Decrement Until ZeroPixel Value (5)5432100Modulation Bit1111100
Low cost digital signal processors (DSP's) are widely available for controlling consumer equipment. DSP's are easily custom programmable to perform operations such as print head modulation. Unfortunately, the Decrement until Zero and Comparison modulation methods both involve conditional operations which are very inefficient when implemented in software, thereby hindering their use with DSP's. A compare operation must always be followed by a conditional operation based on the result of the comparison. A conditional operation typically requires multiple processor cycles to execute, which is inefficient and wastes processor cycles.
There is a need therefore for an improved modulation method for thermal printers that can be more efficiently implemented in software for use in a programmable DSP.